package com.evildog.workspace.invest.application.convert;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.evildog.workspace.common.result.PagedResult;
import com.evildog.workspace.invest.application.bo.BillBO;
import com.evildog.workspace.invest.application.bo.BillListBO;
import com.evildog.workspace.invest.application.bo.BillPageBO;
import com.evildog.workspace.invest.application.dto.BillDTO;
import com.evildog.workspace.invest.application.dto.BillListDTO;
import com.evildog.workspace.invest.application.dto.BillPageDTO;
import com.evildog.workspace.invest.application.entity.Bill;
import com.evildog.workspace.invest.application.entity.BillListDO;
import com.evildog.workspace.invest.application.entity.BillPageDO;
import com.evildog.workspace.invest.application.model.BillListParam;
import com.evildog.workspace.invest.application.model.BillPageParam;
import com.evildog.workspace.invest.application.model.BillParam;
import com.evildog.workspace.invest.application.vo.BillListVO;
import com.evildog.workspace.invest.application.vo.BillPageVO;
import com.evildog.workspace.invest.application.vo.BillVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.Collection;
import java.util.List;

@Mapper
public interface BillConvert {

    BillConvert INSTANCE = Mappers.getMapper(BillConvert.class);

    BillPageDTO convert(BillPageParam billPageParam);

    BillListDTO convert(BillListParam billListParam);

    BillDTO convert(BillParam billParam);

    @Mapping(target = "isDeleted", ignore = true)
    Bill convert(BillDTO billDTO);

    BillPageDO convert(BillPageDTO billPageDTO);

    BillVO convert(BillBO billBO);

    BillBO convert(Bill bill);

    List<BillListBO> convert(List<BillListDO> billList);

    List<BillListVO> convertVoList(List<BillListBO> billListBO);

    @Mappings({})
    PagedResult<BillPageBO> convert(IPage<BillPageDO> page);

    PagedResult<BillPageVO> convert(PagedResult<BillPageBO> page);

    List<BillBO> convert(Collection<BillListDO> list);
}